package ext;

import java.io.BufferedInputStream;

import java.util.*;
import org.junit.*;

public class AddtionOf36 {
    
    //36进制使用0-9，a-z组成
    public String add(String a, String b) {
        if (a.length() > b.length()) return add(b, a);
        StringBuilder sb = new StringBuilder();
        char[] as = a.toCharArray();
        char[] bs = b.toCharArray();
        int al = a.length(), bl = b.length();
        int i = al - 1, j = bl - 1, sum, flag = 0;
        while (i >= 0) {
            sum = flag + charToInt(as[i]) + charToInt(bs[j]);
            sb.insert(0, intToChar(sum % 36));
            flag = sum / 36;
            i--;
            j--;
        }
        while (j >= 0) {
            sum = flag + charToInt(bs[j]);
            sb.insert(0, intToChar(sum / 36));
            flag = sum % 36;
            j--;
        }
        return sb.toString();
    }

    public int charToInt(char c) {
        if (c >= '0' && c <= '9') return c - '0';
        else return c - 'a' + 10;
    }

    public char intToChar(int i) {
        if (i >= 0 && i <= 9) return (char)(i + '0');
        else return (char)(i + 'a' - 10);
    }

    public static void main(String[] args){
        Scanner sc = new Scanner(new BufferedInputStream(System.in));
        String a = sc.next();
        String b = sc.next();
        // String s = sc.nextLine();
        // String[] ss = s.split("\s+");
        // String a = ss[0], b = ss[1];
        // sc.close();
        String res = new AddtionOf36().add(a, b);
        System.out.println(res);
    } // 1 2

    @Test
    public void test() {
        System.out.println(add("2x", "1b"));
    }
}
